Polygon and line clipping methods and algorithms are well known in the field of computer graphics. In computer graphics, clipping refers to an operation where only portions of the vector or raster image that are visible to the user are drawn. This can save processing time on parts of the image that do not fall into any visible region of the display. For 2D vector graphics data, such as polygons and lines, clipping consists of deciding which of the vector data will be completely visible, completely invisible or partially visible. For the former two cases, the system either completely draws or throws away the respective geometry and for the partially visible case, the geometry is ‘cut’ such that only the visible portion is drawn. For example, a line segment may be intersected with the visible boundary of the display to come up with a shorter line segment which is completely contained within the bounds of the display. Hence clipping is used to accelerate the time taken to render graphics to the display.
Well known polygon clipping methods include the Sutherland-Hodgman method of clipping a candidate polygon against a rectangular clipping window, and the Maillot or Liang-Barsky methods of clipping a polygon in relation to nine regions within a clipping plane. While these methods are effective, they still require significant computational resources and time to render each new frame. This is of particular concern in mobile devices where new and more powerful graphics applications are being deployed, and where computational resources and power usage are at a premium.
Well known line clipping methods include the Cohen-Sutherland method, in which, for rectangular windows, the four edges of the clip window are extended, and nine regions are created from their intersection, of which only the middle region (viewport) is visible. The Cohen-Sutherland method includes, excludes or partially includes lines based on the regions in which the endpoints lie. The Liang-Barsky line clipping method is another popular line clipping algorithm. It uses the parametric equation of a line and inequalities describing the range of the clipping window to determine the intersections between the line and the clipping rectangle. While these methods are effective, they still require significant computational resources and time to render each new frame. This is of particular concern in mobile devices where new and more powerful graphics applications are being deployed, and where computational resources and power usage are at a premium.
Improvements in methods and systems of clipping geometry including polygons and lines are desirable.